﻿using Ninject;
using Tetris.Interfaces;
using Tetris.Screens;

namespace Tetris
{
    public static class Bootstrapper
    {
        public static IKernel Bootstrap(IGameManager gameManagerInstance)
        {
            IKernel kernel = new StandardKernel();

            kernel.Bind<IContentFactory>().To<ContentFactory>().InSingletonScope();
            kernel.Bind<ILevelManager>().To<StandardLevelManager>().InSingletonScope();
            kernel.Bind<IInputManager>().To<StandardInputManager>().InSingletonScope();
            kernel.Bind<IScreenManager>().To<ScreenManager>().InSingletonScope();

            kernel.Bind<IGameManager>().ToMethod( c => gameManagerInstance ).InSingletonScope();
            
            return kernel;
        }
    }
}
